Maintaining track format metadata for target tracks in a target storage in a copy relationship with source tracks in a source storage

ABSTRACT

Provided area computer program product, system, and method for maintaining track format metadata for target tracks in a target storage in a copy relationship with source tracks in a source storage. Upon receiving a request to a requested target track in the target storage, the source track for the requested target track is staged from the source storage to a cache to be used as the requested target track in response to determining that the copy relationship information indicates that a source track needs to be copied to the requested target track. A determination is made of track format metadata for the requested target track, comprising the staged source track, indicating a format and layout of data in the requested target track and a track format code identifying the track format metadata. The track format code is included in a cache control block for the requested target track.

BACKGROUND OF THE INVENTION 1. Field of the Invention

The present invention relates to a computer program product, system, andmethod for maintaining track format metadata for target tracks in atarget storage in a copy relationship with source tracks in a sourcestorage.

2. Description of the Related Art

In a storage environment, a host system may communicate a read/writerequest to a connected storage system over a network channel through anetwork adaptor. If the data is in a cache of the storage system, i.e.,a read hit, then the data may be returned quickly to the host system.This reduces the delay in returning requested data to a host I/Orequest. However, if the requested data is not in the cache of thestorage system, then there may be significant latency realized while thestorage system needs to retrieve the requested data from storage toreturn. Further, the thread or task executing the host read request mayhave to be context switched and deactivated in order to allow the hostsystem to process further I/O requests. When the data is returned to theread request, then the task must be reactivated and data for the taskmust be returned to registers and processor cache to allow processing ofthe returned data for the read request.

In storage environments having copy relationships between a sourcestorage and a target storage, updated source tracks in a copyrelationship are copied over to corresponding target tracks in thetarget storage to maintain data consistent between the source and targetstorages as of a point-in-time. The point-in-time source track may becopied when an update to the source track is to be destaged to thesource storage as part of a copy-on-destage operation. In this way, thepoint-in-time version of the source track in the source storage iscopied before being updated by the destaged source track.

In the prior art, if a request is directed to a target track in apoint-in-time copy relationship, then a determination is made if therequested track is in the cache. The presence of the requested targettrack in the cache results from either the target track in cache havingbeen staged from the source storage or staged from the target storage.In either case, the track format metadata needs to be rebuilt from thedata for the requested target track in the cache because the targettrack metadata from the target storage may not be for the data in thetrack in the cache if the target track in the cache comprises a sourcetrack staged from the source storage.

There is a need in the art for improved techniques for processing hostread/write requests to a target track in the target storage that is in apoint-in-time copy relationship with a source storage.

SUMMARY

Provided are a computer program product, system, and method formaintaining track format metadata for target tracks in a target storagein a copy relationship with source tracks in a source storage. Uponreceiving a request to a requested target track in the target storage, adetermination is made as to whether copy relationship information forthe point-in-time copy relationship indicates that a source track needsto be copied to the requested target track in the target storage. Thesource track for the requested target track is staged from the sourcestorage to a cache to be used as the requested target track in responseto determining that the copy relationship information indicates that asource track needs to be copied to the requested target track. Adetermination is made as to whether track format metadata for therequested target track, comprising the staged source track, indicates aformat and layout of data in the requested target track. A determinationis made of a track format code identifying the track format metadata.The track format code is included in a cache control block for therequested target track. The track format code in the cache control blockis used to determine the track format metadata to process subsequentrequests to the requested target track in the cache.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an embodiment of a storage environment.

FIG. 2 illustrates an embodiment of a track format table entry.

FIG. 3 illustrates an embodiment of a cache control block.

FIG. 4 illustrates an embodiment of a Least Recently Used (LRU) list oftracks in the cache.

FIG. 5 illustrates an embodiment of a point-in-time copy relationship.

FIG. 6 illustrates an embodiment of operations to process a read/writerequest received on a first channel, such as a bus interface.

FIG. 7 illustrates an embodiment of operations to process a read/writerequest received on a second channel, such as a network.

FIG. 8 illustrates an embodiment of operations to close track metadataand determine a track format code for the track in cache of the closedtrack metadata.

FIGS. 9a and 9b illustrate an embodiment of operations to process arequest to a target track in a target storage in a copy relationship.

FIG. 10 illustrates an embodiment of operations to process a request toa target track in a target storage in a copy relationship on a firstchannel for fast processing.

FIG. 11 illustrates an embodiment of operations to process a request toa target track in a target storage in a copy relationship on a secondchannel.

FIG. 12 illustrates an embodiment of a computer architecture used withdescribed embodiments.

DETAILED DESCRIPTION

In a storage environment, a host system may first communicate aread/write request to a connected storage system over a fast channel,such as a bus interface, such as the Peripheral Component InterconnectExpress (PCIe) interface. For a read/write request over the fast channelwhich is supposed to complete within a threshold time, the host systemholds the application thread for the read/write request in a spin loopwaiting for the request to complete. This saves processor timeassociated with a context swap, which deactivates the thread andreactivates the thread in response to an interrupt when a response tothe read/write request is received. If the data for the read/writerequest sent on the fast channel is not in cache, then the storagesystem may fail the read/write request and the host system maycommunicate the same read/write request over a storage area network viaa host adaptor, which is slower than processing the I/O request over thebus, e.g., PCIe interface. Communicating the read/write request over thesecond channel requires the host system to perform a context switch fromthe task handling the read/write request to another task while waitingfor the read/write request to complete. Context switching is costlybecause it requires the processor running the task to clear allregisters and L1 and L2 caches for the new task, and then whencompleting the new task, reactivate the context switched task and returnthe state data to the registers and L1 and L2 caches for the task thatwas context switched while waiting for the read/write request tocomplete.

Certain read/write operations need to be completed within a thresholdtime, else they are failed. The storage system will have to access trackmetadata to process a request to a track. The track metadata providesinformation on the format of data and layout of records in the trackthat are needed in order to perform reads and writes to the track.However, the reading of the track metadata from the storage comprises asubstantial portion of the latency in processing read/write request.Described embodiments provide improvements to cache technology thatreduce cache operation latency by including a track format code in thecache control block for a track in the cache. This track format code maybe used for fast access to the track format from a track format tablewithout having to read the track metadata from storage. By eliminatingthe need to read the track metadata from a metadata track in storage todetermine the track layout, described embodiments increase thelikelihood that read/write requests on the first channel that need to becompleted within a threshold time are completed by accessing the tracklayout information for a track from the track format table, associatingtrack format codes with track format information for common trackformats.

With described embodiments, a read/write request to a target track on achannel requiring that the request be completed within a threshold timeis processed if the track format code for the target track is within thecache control block for the target track. Using the track format code toaccess the track format metadata from the track format table reduces thelatency of access to the track format metadata to allow the read/writerequest to complete within the time threshold. This keeps the time thehost thread is spinning on the read/write request task for theread/write request sent on the bus interface within an acceptable timethreshold. However, if the cache control block for the target track doesnot have a valid track format code, then the read/write request on thefirst channel is failed because it is unlikely the read/write requestcan complete within the threshold time given that the track formatmetadata will have to be retrieved from the storage. Failing theread/write request on the first channel, causes the host to redrive theread/write request on the second channel. The processing of theread/write request on the second channel reads in the track metadatafrom the storage to allow for processing the read/write request andadding the track format code to the cache control block for the targettrack.

In further embodiments, a source storage system may copy source tracksfrom a source storage to target tracks in a target storage in a targetstorage system as part of a copy relationship. If there is a read orwrite request to a target track in the target storage system, then adetermination may be made as to whether a source track corresponding tothe target track in the copy relationship has been copied to the targetstorage. If the point-in-time source track for the requested targettrack has not yet been copied to the target storage, then the targetstorage system may stage the source track into the target cache to usefor the requested target track. Further, when the source track is stagedinto the target track, track metadata may be built for the source trackbeing used for the target track. If track format metadata in the builttrack metadata matches track format metadata in the track format table,then the track format code for the matching track format metadata may beincluded in the cache control block for the source track staged intocache for the requested target track to use for subsequent requests tothe requested target track. This improves performance for requests totarget tracks in the cache that are in a copy relationship, because thetrack format metadata for such a cached target track may be readilydetermined from the track format code without having to rebuild thetrack metadata from the target track in the cache, which may comprisethe point-in-time source track staged from the source storage.

Further, if a request for a target track is received on a channelrequiring that the request be completed within a threshold time, then adetermination may be made as to whether a copy relationship indicatesthat the point-in-time source track corresponding to the requestedtarget track needs to be copied to the target storage. In such case, therequest on the fast channel requiring processing within a timeconstraint is failed because too much latency would be introduced byhaving to stage the source track to the cache to use for the requestedtarget track. However, once the track format code for the track formatmetadata of the staged point-in-time source track is in the cachecontrol block, than the track format code may be used to determine thetrack format metadata to use to complete future requests to the targettrack on the channel requiring fast response.

FIG. 1 illustrates an embodiment of a storage environment in which ahost 100 directs read and write requests to a storage system 102 toaccess tracks in volumes configured in storage devices 104 in a diskenclosure 106. The host 100 includes a processor complex 108 of one ormore processor devices and a memory 110 including an operating system111 executed by the processor complex 108. The host operating system 111generates read and write requests to tracks configured in the storagedevices 104. The host 100 includes hardware to communicate read andwrite requests on two different channels. A first channel is a businterface, such as a Peripheral Component Interconnect Express (PCIe),including a bus 112, a bus switch 114 to connect one or more devices onthe bus 112, including the processor complex 108, a memory 110, and abus host adaptor 116 to extend the bus interface over an external businterface cable 118 to the storage system 102. Additional bus interfacetechnology to extend the bus interface may be utilized, including PCIeextender cables or components, such as a distributed PCIe switch, toallow PCIe over Ethernet, such as with the ExpEther technology. A secondchannel to connect the host 100 and storage system 102 uses a networkhost adaptor 120, connected to the bus 112, that connects to a separatenetwork 122 over which the host 100 and storage system 102 additionallycommunicate. The first channel through the bus interface may comprise afaster access channel than the network 122 interface through the networkhost adaptor 120.

The storage system 102 includes a bus interface comprising a bus 124 a,124 b, a bus switch 126 to connect to endpoint devices on the bus 124 a,124 b, and a bus host adaptor 128 to connect to the external businterface cable 118 to allow communication over the bus interface to thehost 100 over the first channel. The storage system 102 includes anInput/Output bay 130 having the bus host adaptor 128, one or more deviceadaptors 132 to connect to the storage devices 104, and one or morenetwork host adaptors 134 to connect to the network 122 and hostsystems.

The storage system 102 includes a processor complex 136 of one or moreprocessor devices and a memory 138 having a cache 140 to cache tracksaccessed by the connected hosts 100. The memory 138 includes a cachemanager 142, a storage manager 144, and a copy manager 150. The storagemanager 144 manages access requests from processes in the hosts 100 andstorage system 102 for tracks in the storage 104. The devices 136, 138,128, 132, and 134 connect over the bus interface implemented in the buslanes 124 a, 124 b and bus switch 126.

The cache manager 142 maintains accessed tracks in the cache 140 forfuture read access to the tracks to allow the accessed tracks to bereturned from the faster access cache 140 instead of having to retrievefrom the storage 104. Further, tracks in the cache 140 may be updated bywrites. A track may comprise any unit of data configured in the storage104, such as a track, Logical Block Address (LBA), etc., which is partof a larger grouping of tracks, such as a volume, logical device, etc.

The cache manager 142 maintains cache management information 146 in thememory 138 to manage read (unmodified) and write (modified) tracks inthe cache 140. The cache management information 146 may include a trackformat table 200 having track format codes for common track formatdescriptors providing details of a layout and format of data in a track;track index 148 providing an index of tracks in the cache 140 to cachecontrol blocks in a control block directory 300; and a Least RecentlyUsed (LRU) list 400 for tracks in the cache 140. The control blockdirectory 300 includes the cache control blocks, where there is onecache control block for each track in the cache 140 providing metadataon the track in the cache 140. The track index 148 associates trackswith the cache control blocks providing information on the tracks in thecache 140. Upon determining that the cache LRU list 400 is full or hasreached a threshold level, tracks are demoted from the LRU list 400 tomake room for more tracks to stage into the cache 140 from the storage104.

The copy manager 150 manages point-in-time copy relationships inpoint-in-time copy relationship information 500 to copy data as of apoint-in-time from a source storage to a target storage. The copymanager 150 would copy over point-in-time source tracks to the targetstorage tracks before the source tracks are updated so that the targetstorage maintains the source tracks as of the point-in-time, and beforethey are updated after the point-in-time of the copy relationship.

In certain embodiments, there may be multiple hosts 100 that connect tothe storage system 102 over the first and second channels to accesstracks in the storage devices 104. In such case, the storage system 102would have at least one bus host adaptor 128 to connect to the businterface 118 of each connected host 100 and one or more network hostadaptors 134 to connect to the network host adaptors 120 on the hosts100.

In one embodiment, the bus interfaces 112, 114, 116, 118, 124 a, 124 b,126, and 128 may comprise a Peripheral Component Interconnect Express(PCIe) bus interface technology. In alternative embodiments, the businterfaces 112, 114, 116, 118, 124 a, 124 b, 126, and 128 may utilizesuitable bus interface technology other than PCIe. The bus host adaptors116 and 128 may comprise PCIe host adaptors that provide the interfaceto connect to the PCIe cable 118. The network 122 may comprise a StorageArea Network (SAN), a Local Area Network (LAN), a Wide Area Network(WAN), the Internet, an Intranet, etc., and the network host adaptors120, 134 provide the network 122 connections between the hosts 100 andstorage system 102.

The storage system 102 may comprise a storage system, such as theInternational Business Machines Corporation (IBM®) DS8000® and DS8880storage systems, or storage controllers and storage systems from othervendors. (IBM and DS8000 are trademarks of International BusinessMachines Corporation throughout the world). The host operating system111 may comprise an operating system such as Z Systems Operating System(Z/OS®) from International Business Machines Corporation (“IBM”) orother operating systems known in the art. (Z/OS is a registeredtrademark of IBM throughout the world).

The storage devices 104 in the disk enclosure 106 may comprise differenttypes or classes of storage devices, such as magnetic hard disk drives,solid state storage device (SSD) comprised of solid state electronics,EEPROM (Electrically Erasable Programmable Read-Only Memory), flashmemory, flash disk, Random Access Memory (RAM) drive, storage-classmemory (SCM), etc., Phase Change Memory (PCM), resistive random accessmemory (RRAM), spin transfer torque memory (STT-RAM), conductivebridging RAM (CBRAM), magnetic hard disk drive, optical disk, tape, etc.Volumes in a storage space may further be configured from an array ofdevices, such as Just a Bunch of Disks (JBOD), Direct Access StorageDevice (DASD), Redundant Array of Independent Disks (RAID) array,virtualization device, etc. Further, the storage devices 104 in the diskenclosure 106 may comprise heterogeneous storage devices from differentvendors and different types of storage devices, such as a first type ofstorage devices, e.g., hard disk drives, that have a slower datatransfer rate than a second type of storage devices, e.g., SSDs.

FIG. 2 illustrates an embodiment of a track format table entry 200 _(i)in the track format table 200, which includes a track format code 202and the track format metadata 204. In certain embodiments Count Key Data(CKD) track embodiments, the track format metadata 204 may comprise atrack format descriptor (TFD) indicating a number of records in thetrack, a block size, a number of blocks in the track, a data length ofeach of the records, and a control interval size indicating an amount ofdata that is read or written atomically as a unit, number of blocks in acontrol interval, and whether a control interval spans two tracks, andother information. The track format code 202 may comprise an index valueof the index entry 200 _(i) in the track format table 200. For instance,if there are 32 track format table entries 200 _(i), then the trackformat code 202 may comprise 5 bits to reference the different possiblenumber of 32 entries 200 _(i).

FIG. 3 illustrates an embodiment of a cache control block 300 _(i) forone of the tracks in the cache 140, including, but not limited to, acache control block identifier 302, such as an index value of the cachecontrol block 300 _(i); a track ID 304 of the track in the storage 104;the cache LRU list 306 in which the cache control block 300 _(i) isindicated; an LRU list entry 308 at which the track is indicated; acache timestamp 310 indicating a time the track was added to the cache140 and indicated on the LRU list 306; additional track metadata 312typically maintained for tracks stored in the cache 140, such as a dirtyflag indicting whether the track was modified; a track format code 314comprising one of the track format codes 202 of the track formatmetadata 204 describing the layout of data in the track 304 representedby the cache control block 300 _(i); a track format code valid flag 316indicating whether the track format code 314 is valid or invalid; and aninvalid reason 318 indicating a reason for the track format code validflag 316 code being invalid, as indicated in the track format code validflag 316.

FIG. 4 illustrates an embodiment of an LRU list 400 _(i), such as havinga most recently used (MRU) end 402 identifying a track most recentlyadded to the cache 140 or most recently accessed in the cache 140 and aleast recently used (LRU) end 404 from which the track identified at theLRU end 404 is selected to demote from the cache 140. The MRU end 402and LRU end 404 point to track identifiers, such as a track identifieraddress or a cache control block index for the track, of the tracks thathave been most recently added and in the cache 140 the longest,respectively, for tracks indicated in that list 400.

FIG. 5 illustrates an instance of the point-in-time copy information 500_(i), which may include a point-in-time copy identifier 502 identifyingthe point-in-time copy created by the copy manager 150; a point-in-time504 of the point-in-time copy 502, which may mean that data isconsistent as of that point-in-time 504; a source storage 506 and targetstorage 508 of the point-in-time copy relationship; copy information 510indicating which data or tracks in the source storage 506 have beencopied to the target storage 508 for data as of the point-in-time 504.The copy information 510 may comprise a bitmap having a bit for eachdata unit (e.g., track) that is set to one of two values indicating thedata or track represented by the bit has or has not been copied from thesource storage to the target storage as part of the copy relationship.

In certain embodiments, the point-in-time copy relationship 500 _(i) maycomprise a FlashCopy® (FlashCopy is a registered trademark of IBM),snapshot, etc. A point-in-time copy replicates data in a manner thatappears instantaneous and allows a host to continue accessing the sourcestorage while actual data transfers to the copy volume are deferred to alater time. The point-in-time copy appears instantaneous becausecomplete is returned to the copy operation in response to generating therelationship data structures without copying the data from the source tothe target volumes. Point-in-time copy techniques typically defer thetransfer of the data in the source volume at the time the point-in-timecopy relationship was established to the copy target volume untilmodified data for the source track is to be destaged to the sourcevolume. Data transfers may also proceed as a background copy processwith minimal impact on system performance. The copy information 510indicates those source tracks in the source storage 506 that have beencopied to the target storage for the point-in-time copy relationship 500_(i), such as being copied in response to an updated source track beingdestaged to the source storage, i.e., a copy-on-destage. In this way,the source track as of the point-in-time 504 in the source storage 506are copied to the target storage 508 before being updated by a destage,or copy-on-destage operation. The copy information 510 is updated, suchas the bit is set, when copying over the source track from the storage506 to the target storage 508.

In one embodiment, the source storage 506 and target storage 508 maycomprise source and target volumes configured in the storage 104, wheresource tracks and target tracks from the source and target storages arecached in the cache 140 managed by a single processor complex 136. In analternative embodiment, the source storage 506 and target storage 508may be implemented in separate storage systems that communicate over anetwork, where the source and target storage systems have separatecaches to store tracks from the source and target storages. In a stillfurther embodiment, the source and target storages may be in the samestorage system but managed by different first and second processingnodes in the storage system. For instance, tracks in the source storagemay be managed by a first processing node, having a first cache, in adual processing node system, and the target tracks in the target storagemay be managed by a second processing node, having a second cache, inthe dual processing system. In such dual processing node systems, thesource tracks and target tracks may be maintained in the separate cachesin the first and second processing nodes.

FIG. 6 illustrates an embodiment of operations performed by the cachemanager 142 and storage manager 144 to process a read/write request to atarget track received on a first fast channel, such as the PCIe businterface via bus host adaptor 128. Upon receiving (at block 600) theread/write request at the bus host adaptor 128, if (at block 602) thetarget track is not in the cache 140, then the storage manager 144returns (at block 604) fail to the read/write request on the firstchannel or bus host adaptor 128 to the host 100, which causes the host100 to retry the read/write request on the second channel or networkhost adaptor 120, 134. Failure is returned because if the target trackis not in the cache 140, then the target track and track metadata needsto be staged into cache 140, which would likely exceed the timethreshold for read/writes on the first channel, where the host processoris spinning on the thread of the read/write request. If (at block 602)the target track is in the cache 140 is a write and if (at block 608)the write modifies the track format, then the cache manager 142 sets (atblock 610) the track format code valid flag 316 to invalid and indicates(at block 512) the invalid reason 318 that the track in the cache 140was invalidated as track format change. The storage manager 144 thenreturns (at block 604) fail to the host 100 because the track metadataneeds to be read from the storage 104 to update with the modified trackformat.

If (at block 606) the read/write request is a read or if (at block 608)the request is a write that does not modify the track format, then thecache manager 142 determines (at block 614) if the track format codevalid flag 316 is set to valid. If so, then the cache manager 142determines (at block 616) the track format metadata 204 in the trackformat table 200 corresponding to the track format code 314 in the cachecontrol block 300 _(i). The cache manager 142 uses (at block 618) thetrack format layout indicated in the determined track format metadata204 to process the read or write request to the target track in thecache 140. If the request is a write, a dirty flag 312 in the cachecontrol block 300 _(i) may be set to indicate the track is modified. If(at block 614) the track format code valid flag 316 is invalid, meaningthere is no fast access to track format information available throughthe track format code 314, then the storage manager 144 returns (atblock 604) fail on the bus interface to the bus host adaptor 128 becausethe track format table 200 cannot be used, and the track metadata needsto be read from the storage 104, which would introduce too much latencyfor the fast read/write on the first channel.

With the embodiment of operations of FIG. 6, during a fast write overthe bus interface or first channel, if the track format metadata may beaccessed without latency through the track format table 200, then theread/write request is allowed to proceed when the transaction can beprocessed very quickly because the track metadata can be obtaineddirectly from the track format table 200 through the track format code314, without having to read the track metadata from storage 104.However, if the cache control block 300 _(i) does not have a valid trackformat code 314 to allow low latency access of track format metadata,then the read/write request is failed because the transaction will notlikely complete within a fast time threshold. This determination isimportant to avoid host delays in processing other tasks while the hostprocessor is spinning on the thread handling the read/write requestwhile waiting for the read/write request to complete. If the trackmetadata can be accessed from the track format table 200 than there is ahigh likelihood the read/write can complete on the bus interface channelwithin the time required to avoid the host processor holding the threadfor too long, which causes other I/O requests to be queued and delayed.If the track metadata cannot be accessed from the track format table 200and needs to be read from the storage 104, then it is unlikely theread/write request will complete within the time threshold for the hostprocessor to spin on the thread for the read/write request, and failureis returned. Returning failure when the track metadata cannot beobtained from the track format table 200 causes the host thread waitingon the read/write request task to be deactivated and the host processormay context switch to processing other tasks, and then the read/writerequest is retried on the second network channel during the contextswitch.

FIG. 7 illustrates an embodiment of operations performed by the cachemanager 142 and storage manager 144 to process a read/write request to atarget track received on a second channel, such as the network 122 onnetwork host adaptor 134. Upon receiving (at block 700) the read/writerequest, if (at block 702) the target track is not in the cache 140,then the cache manager 142 stages (at block 704) the track from thestorage 104 to the cache 140 and reads (at block 706) the track metadatafor the target track from the storage 104 to determine the track format,e.g., size of blocks, control interval, layout of records on the track,etc. If (at block 708) the read/write request is a write and if (atblock 710) the write modifies the track format, then the cache manager142 updates (at block 712) the track metadata to indicate the modifiedtrack format and sets (at block 714) the track format code valid flag316 to invalid. The track metadata 312 is further updated (at block 716)to indicate the track is modified or dirty. If (at block 708) therequest is a read or from block 716, the cache manager 142 uses (atblock 718) the track format layout indicated in the track formatmetadata to process the read or write request to the target track in thecache 140.

If (at block 702) the target track is in the cache 140 and if (at block730) the track format code valid flag 316 is set to valid, then thecache manager 142 determines (at block 732) the track format metadata204 in the track format table 200 corresponding to the track format code314 in the cache control block 300 _(i) for the target track. From block632, control proceeds to block 708 to process the read/write request. If(at block 730) the track format code valid flag 316 is set to invalid,then control proceeds to block 706 to read the metadata for the trackform the storage 104 to determine the track format layout.

With the embodiment of FIG. 7, when the read/write request is receivedon the second slower channel, such as over the network 122, where thehost operating system 111 would have performed a context switch for thethread handling the read/write request, the cache manager 142 may readthe track metadata from the storage 104 to determine the track layout toprocess the request. During this time, the host processing of furtherhost requests is not delayed because the host thread handling theread/write request is context switched and not active, until theread/write request returns complete.

FIG. 8 illustrates an embodiment of operations performed by the cachemanager 142 when closing the track metadata for a track in the cache140, which involves destaging the track metadata to the storage 104 ifchanged. Upon closing (at block 800) the track metadata for a track inthe cache 140, the cache manager 142 processes (at block 802) the trackmetadata to determine a track format or a layout of data in the track.If (at block 804) the track format table 200 does not have a trackformat metadata 204 matching the determined track format from the trackmetadata, which may happen if the determined track format is irregular,then the track format code valid flag 316 is set (at block 806) toinvalid and the invalid reason 318 is set to indicate that the trackformat is not supported. In such situation, read/write requests to thetrack having an irregular format are only processed when receivedthrough the second channel via network host adaptor 134.

If (at block 804) the track format table has a track format metadata 204matching the determined track format from the track metadata, then thecache manager 142 determines the track format code 202 for thedetermined track format metadata 204 in the track format table 200 andincludes the track format code 202 in the field 314 in the cache controlblock 300 _(i). The track format code valid flag 316 is set (at block816) to valid. From block 808 or 816, control proceeds to block 818 todestage the track metadata from the memory 138 if modified or discard ifnot modified.

With the operations of FIG. 8, the track format information may beindicated in the cache control block 300 _(i) with a track format code202 having a limited number of bits to index track format metadata 204describing track layout in a track format table 200, where the trackmetadata itself would not fit into the cache control block 300 _(i). Forfuture read/write accesses, if a valid track format code 314 isprovided, then the cache manager 142 may use that track format code 314to obtain with low latency the track format metadata 204 from the trackformat table 200 without having to read the track metadata from thestorage 104 and process to determine the track format.

Embodiments Concerning a Copy Relationship Between a Source Storage anda Target Storage

In a point-in-time copy relationship, source tracks in a source storageare copied to the target tracks in a target storage when an updatedsource track in the cache is going to be destaged to the source storage,as part of a copy-on-destage operation at the source storage. In thisway, the point-in-time version of the source track in the source storageis copied before being updated by the destaged source track.

In the prior art, if a request is directed to a target track, then adetermination is made if the requested track is in the cache. Thepresence of the requested target track in the cache results from eitherthe target track in cache having been staged from the source storage orstaged from the target storage. In either case, the track formatmetadata needs to be rebuilt from the data for the requested targettrack in the cache because the target track metadata from the targetstorage may not be for the data in the target track in the cache if thetarget track in the cache was staged from the source storage because thetarget storage has a previous version of the data before thepoint-in-time of the point-in-time copy relationship.

FIGS. 9a and 9b illustrate an embodiment of operations performed by thecache manager 142, storage manager 144, and copy manager 150 to manage arequest from a host 100 to a target track in a target storage 508 in acopy relationship 500 _(i) with a source storage 506 to store data as ofa point-in-time 504. With respect to FIG. 9a , upon receiving (at block900) a request to a target track in the target storage 508 in apoint-in-time copy relationship 500 _(i), the cache manager 142, or copymanager 150, determines (at block 902) whether the copy information 510indicates the source track for the point-in-time of the copyrelationship 500 _(i) has not been copied yet to the target storage 508.If not, then the source track in the source storage 506 corresponding tothe requested target track is staged (at block 904) to the cache 140.The cache manager 142 builds (at block 906) track metadata from thetarget track, comprising the staged source track, that indicates thetrack format metadata of a layout and format of the target track. Thetrack metadata for the requested target track needs to be rebuilt andcannot be accessed from the target track metadata in the target storage508 because the track metadata for the track in the target storage maybe outdated with respect to the point-in-time source track staged intothe cache 140.

The cache manager 142 may then determine (at block 908) whether thetrack format table 200 include track format metadata 204 matching thetrack format metadata in the generated target track metadata. If (atblock 908) the track format table 200 has a track format code 202, thenthe track format code 202 is determined (at block 910) and included (atblock 912) in the cache control block 300 _(i) for the requested targettrack comprising the staged source track. If (at block 908) the cachemanager 142 determines that the track format table 200 does not havetrack format metadata 204 matching that in the generated track metadata,then the track format code valid flag 316 is set (at block 916) toinvalid with an invalid reason 318 indicating the track format codecould not be located. From blocks 912 or 916, the track format metadatais used (at block 914) to process the request to the target track.

If (at block 902) the copy information 510 indicates the source trackfor the point-in-time of the copy relationship 500 _(i) has been copiedto the target storage 508 and if (at block 918) the target track is notin the cache 140, then the cache manager 142 stages (at block 920) thetarget track form the target storage 508 into the cache 140. The trackmetadata for the staged target track (from cache 140 or in storage 104)is read (at block 922) to determine track format metadata for the stagedtarget track. After determining the track format metadata, controlproceeds to block 914 to use the track format metadata to process therequest for the target track in the cache.

If (at block 918) the requested target track is in the cache 140, thencontrol proceeds (at block 924) to block 930 in FIG. 9b . If (at block930) there is a valid track format code 314 in the cache control block300 _(i) for the target track in the cache 140, then the cache manager142 determines (at block 932) the track format metadata 204corresponding to the track format code 314 from the track format table200. If (at block 930) there is no valid track format code 314 for thetarget track in the cache 140, then the cache manager 142 may not knowwhether a metadata track in the cache 140 or target storage havingmetadata for the requested target track is relevant to the target trackin the cache 140, which may have been staged from the source storage 506or the target storage 508. In such case, the cache manager 142 builds(at block 934) the track metadata for the target track, comprising thestaged source track, indicating track format metadata of a layout andformat of the target track in the cache 140. From blocks 932 and 934,the cache manager 142 uses (at block 936) the built or determined trackformat metadata to process the request to the target track in the cache140.

With the operations of FIGS. 9a and 9b , the track format code isincluded in the cache control block for a point-in-time source trackstaged into the cache for a target track for a copy relationship. As aresult, during subsequent accesses to the target track in the cache, thetrack format metadata for the staged source track does not have to berebuilt and can be determined from the previously saved track formatcode in the cache control block. This use of the track format codesubstantially reduces latency of processing requests to target tracks incache staged from the source storage because without the track formatcode in the cache control block, the track format metadata would have tobe rebuilt from the target track in the cache because track metadatafrom the target storage cannot be used because the track metadata fromthe target storage is for a different version of the target track thanwas staged into the cache from the source storage.

For target tracks staged into cache from the target storage after thepoint-in-time copy source track was copied to the target storage, thetrack format code would be included in the cache control block for thetarget track staged from the target storage when the track metadata forthe track in the cache 140 is closed according to the operations of FIG.8.

FIG. 10 illustrates an embodiment of operations to process a request toa target track in the target storage 508 that is in a copy relationship500 _(i) on a first channel, such as a fast channel over a bus 118, suchas a PCIe bus. As mentioned, requests on the fast or bus channel arefailed unless they can be processed with very low latency. Uponreceiving (at block 1000) a request to a track in the target storage 508of a copy relationship 500 _(i), the copy manager 150 determines (atblock 1002) whether the copy information 510 for the copy relationship500 _(i) indicates that a source track corresponding to the requestedtarget track needs to be copied to the target storage. If (at block1002) the source track needs to be copied, then fail is returned (atblock 1004) on the fast first channel, or bus 118 interface, through thebus host adaptors 128, 116 to the host 100. The return of failure to thehost 100 causes the host to retry the request to the target track on theslower channel, such as through the network 122 and network hostadaptors 120, 134. If (at block 1002) the copy relationship 500 _(i)does not indicate that the source track needs to be copied to the targettrack, then control proceeds to block 602 in FIG. 6 to perform first orfast channel processing for the request.

With the embodiment of FIG. 10, the request on the PCIe bus channel,where the thread for the I/O task remains spinning on the requestwaiting for data from the host 100, is failed if the request is to atarget track that needs to be updated with a corresponding source trackhaving modified data from a copy relationship. This failure occursbecause the time required to stage the corresponding source track fromthe source storage 506 would exceed the latency or delay requirement ofthe fast channel I/O request. However, if there is no source track thatneeds to be copied to the requested target track, then the copyrelationship will not increase latency and control can proceed to FIG. 6to attempt to satisfy the request on the first or bus channel.

FIG. 11 illustrates an embodiment of operations to process a request toa target track in a copy relationship received on a second slowerchannel, such as a network interface, after the request is failed on thefirst channel. Upon receiving (at block 1100) a request, e.g.,read/write request, to a target track on the second, slower, channel,through the network 122 and network host adaptors 120, 134, controlproceeds (at block 1102) to block 902 in FIG. 9a to process the request.The result of processing the request according to FIG. 9a, 9b isreturned to the host on the second channel, such as through the network122.

With the operations of FIG. 11, when the request is received on theslower network channel after failure is returned on the faster buschannel, then processing may involve staging the source track for therequested target track to the cache.

When demoting a target track from the cache 140, the target track wouldonly be destaged to the target storage if the target track includesmodified data. The target track would not be destaged if unmodified,because if the target track in the cache comprises the data staged fromthe source track in the source storage, then the target track metadatamay be different from the track metadata for the target track in thetarget storage, which includes the data for the target track before thesource track was staged to the cache.

The present invention may be implemented as a system, a method, and/or acomputer program product. The computer program product may include acomputer readable storage medium (or media) having computer readableprogram instructions thereon for causing a processor to carry outaspects of the present invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Java, Smalltalk, C++ or the like,and conventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

The computational components of FIG. 1, including the host 100 andstorage system 102 may be implemented in one or more computer systems,such as the computer system 1202 shown in FIG. 12. Computersystem/server 1202 may be described in the general context of computersystem executable instructions, such as program modules, being executedby a computer system. Generally, program modules may include routines,programs, objects, components, logic, data structures, and so on thatperform particular tasks or implement particular abstract data types.Computer system/server 1202 may be practiced in distributed cloudcomputing environments where tasks are performed by remote processingdevices that are linked through a communications network. In adistributed cloud computing environment, program modules may be locatedin both local and remote computer system storage media including memorystorage devices.

As shown in FIG. 12, the computer system/server 1202 is shown in theform of a general-purpose computing device. The components of computersystem/server 1202 may include, but are not limited to, one or moreprocessors or processing units 1204, a system memory 1206, and a bus1208 that couples various system components including system memory 1206to processor 1204. Bus 1208 represents one or more of any of severaltypes of bus structures, including a memory bus or memory controller, aperipheral bus, an accelerated graphics port, and a processor or localbus using any of a variety of bus architectures. By way of example, andnot limitation, such architectures include Industry StandardArchitecture (ISA) bus, Micro Channel Architecture (MCA) bus, EnhancedISA (EISA) bus, Video Electronics Standards Association (VESA) localbus, and Peripheral Component Interconnects (PCI) bus.

Computer system/server 1202 typically includes a variety of computersystem readable media. Such media may be any available media that isaccessible by computer system/server 1202, and it includes both volatileand non-volatile media, removable and non-removable media.

System memory 1206 can include computer system readable media in theform of volatile memory, such as random access memory (RAM) 1210 and/orcache memory 1212. Computer system/server 1202 may further include otherremovable/non-removable, volatile/non-volatile computer system storagemedia. By way of example only, storage system 1213 can be provided forreading from and writing to a non-removable, non-volatile magnetic media(not shown and typically called a “hard drive”). Although not shown, amagnetic disk drive for reading from and writing to a removable,non-volatile magnetic disk (e.g., a “floppy disk”), and an optical diskdrive for reading from or writing to a removable, non-volatile opticaldisk such as a CD-ROM, DVD-ROM or other optical media can be provided.In such instances, each can be connected to bus 1208 by one or more datamedia interfaces. As will be further depicted and described below,memory 1206 may include at least one program product having a set (e.g.,at least one) of program modules that are configured to carry out thefunctions of embodiments of the invention.

Program/utility 1214, having a set (at least one) of program modules1216, may be stored in memory 1206 by way of example, and notlimitation, as well as an operating system, one or more applicationprograms, other program modules, and program data. Each of the operatingsystem, one or more application programs, other program modules, andprogram data or some combination thereof, may include an implementationof a networking environment. The components of the computer 1202 may beimplemented as program modules 1216 which generally carry out thefunctions and/or methodologies of embodiments of the invention asdescribed herein. The systems of FIG. 1 may be implemented in one ormore computer systems 1202, where if they are implemented in multiplecomputer systems 1202, then the computer systems may communicate over anetwork.

Computer system/server 1202 may also communicate with one or moreexternal devices 1218 such as a keyboard, a pointing device, a display1220, etc.; one or more devices that enable a user to interact withcomputer system/server 1202; and/or any devices (e.g., network card,modem, etc.) that enable computer system/server 1202 to communicate withone or more other computing devices. Such communication can occur viaInput/Output (I/O) interfaces 1222. Still yet, computer system/server1202 can communicate with one or more networks such as a local areanetwork (LAN), a general wide area network (WAN), and/or a publicnetwork (e.g., the Internet) via network adapter 1224. As depicted,network adapter 1224 communicates with the other components of computersystem/server 1202 via bus 1208. It should be understood that althoughnot shown, other hardware and/or software components could be used inconjunction with computer system/server 1202. Examples, include, but arenot limited to: microcode, device drivers, redundant processing units,external disk drive arrays, RAID systems, tape drives, and data archivalstorage systems, etc.

The terms “an embodiment”, “embodiment”, “embodiments”, “theembodiment”, “the embodiments”, “one or more embodiments”, “someembodiments”, and “one embodiment” mean “one or more (but not all)embodiments of the present invention(s)” unless expressly specifiedotherwise.

The terms “including”, “comprising”, “having” and variations thereofmean “including but not limited to”, unless expressly specifiedotherwise.

The enumerated listing of items does not imply that any or all of theitems are mutually exclusive, unless expressly specified otherwise.

The terms “a”, “an” and “the” mean “one or more”, unless expresslyspecified otherwise.

Devices that are in communication with each other need not be incontinuous communication with each other, unless expressly specifiedotherwise. In addition, devices that are in communication with eachother may communicate directly or indirectly through one or moreintermediaries.

A description of an embodiment with several components in communicationwith each other does not imply that all such components are required. Onthe contrary a variety of optional components are described toillustrate the wide variety of possible embodiments of the presentinvention.

When a single device or article is described herein, it will be readilyapparent that more than one device/article (whether or not theycooperate) may be used in place of a single device/article. Similarly,where more than one device or article is described herein (whether ornot they cooperate), it will be readily apparent that a singledevice/article may be used in place of the more than one device orarticle or a different number of devices/articles may be used instead ofthe shown number of devices or programs. The functionality and/or thefeatures of a device may be alternatively embodied by one or more otherdevices which are not explicitly described as having suchfunctionality/features. Thus, other embodiments of the present inventionneed not include the device itself.

The foregoing description of various embodiments of the invention hasbeen presented for the purposes of illustration and description. It isnot intended to be exhaustive or to limit the invention to the preciseform disclosed. Many modifications and variations are possible in lightof the above teaching. It is intended that the scope of the invention belimited not by this detailed description, but rather by the claimsappended hereto. The above specification, examples and data provide acomplete description of the manufacture and use of the composition ofthe invention. Since many embodiments of the invention can be madewithout departing from the spirit and scope of the invention, theinvention resides in the claims herein after appended.

What is claimed is:
 1. A computer program product for managing read andwrite requests to a target storage and configured to communicate with asource storage, the computer program product comprising a computerreadable storage medium having computer readable program code embodiedtherein that is executable to communicate with a cache and to performoperations, the operations comprising: receiving a request to a targettrack in the target storage in a point-in-time copy relationship with asource track in the source storage; staging the source track from thesource storage to the cache to be used as the requested target track;including a track format code, identifying track format metadata for thestaged source track, in a cache control block for the staged sourcetrack; and using the track format code in the cache control block todetermine the track format metadata to process subsequent requests tothe requested target track in the cache.
 2. The computer program productof claim 1, wherein the operations further comprise: maintaining a trackformat table associating track format codes with track format metadata,wherein each of the track format metadata indicates a layout of data ina track, wherein the track format table has track format metadata forthe track format code included in the cache control block that matchestrack format metadata for the staged source track.
 3. The computerprogram product of claim 2, wherein the operations further comprise:building track format metadata from the requested target track in thecache; and determining whether the track format table includes trackformat metadata matching the built track format metadata, wherein thetrack format code is included in the cache control block in response todetermining that the track format table includes the built track formatmetadata.
 4. The computer program product of claim 1, wherein the sourcetrack is staged from the source storage and included in the cachecontrol block in response to the point-in-time copy relationshipindicating the source track was not copied to the target storage,wherein the operations further comprise: staging the requested targettrack from the target storage to the cache in response to the requestedtarget track not in the cache and point-in-time copy relationshipinformation indicating that the source track for the requested targettrack was copied to the target storage.
 5. The computer program productof claim 1, wherein the source track is staged from the source storageand included in the cache control block in response to the point-in-timecopy relationship indicating the source track was not copied to thetarget storage, and wherein the operations further comprise: determiningwhether there is a valid track format code in the cache control blockfor the requested target track in response to the requested target tracknot in the cache and point-in-time copy relationship informationindicating that the source track for the requested target track wascopied to the target storage; determining track format metadatacorresponding to the track format code from a track format code table inresponse to determining that the cache control block for the requestedtarget track includes a valid track format code; and using the trackformat metadata corresponding to the track format code to process therequest to the requested target track in the cache.
 6. The computerprogram product of claim 1, wherein the request is received on a firstchannel connecting to a host, wherein the operations further comprise:failing the request in response to point-in-time copy relationshipinformation indicating that the source track for the requested targettrack needs to be copied to the target storage.
 7. The computer programproduct of claim 6, wherein the operations further comprise: receivingthe request to the requested target track on a second channel connectedto the host after failing the request for the requested target track,wherein the staging the source track from the source storage and theincluding the track format code in the cache control block are performedin response to receiving the request on the second channel.
 8. A systemfor managing read and write requests to a target storage and incommunication with a source storage, comprising: a processor; a cache;and a computer readable storage medium having computer readable programcode embodied therein that is executed by the processor to performoperations, the operations comprising: receiving a request to a targettrack in the target storage in a point-in-time copy relationship with asource track in the source storage; staging the source track from thesource storage to the cache to be used as the requested target track;including a track format code, identifying track format metadata for thestaged source track, in a cache control block for the staged sourcetrack; and using the track format code in the cache control block todetermine the track format metadata to process subsequent requests tothe requested target track in the cache.
 9. The system of claim 8,wherein the operations further comprise: maintaining a track formattable associating track format codes with track format metadata, whereineach of the track format metadata indicates a layout of data in a track,wherein the track format table has track format metadata for the trackformat code included in the cache control block that matches trackformat metadata for the staged source track.
 10. The system of claim 9,wherein the operations further comprise: building track format metadatafrom the requested target track in the cache; and determining whetherthe track format table includes track format metadata matching the builttrack format metadata, wherein the track format code is included in thecache control block in response to determining that the track formattable includes the built track format metadata.
 11. The system of claim8, wherein the source track is staged from the source storage andincluded in the cache control block in response to the point-in-timecopy relationship indicating the source track was not copied to thetarget storage, wherein the operations further comprise: staging therequested target track from the target storage to the cache in responseto the requested target track not in the cache and point-in-time copyrelationship information indicating that the source track for therequested target track was copied to the target storage.
 12. The systemof claim 8, wherein the source track is staged from the source storageand included in the cache control block in response to the point-in-timecopy relationship indicating the source track was not copied to thetarget storage, and wherein the operations further comprise: determiningwhether there is a valid track format code in the cache control blockfor the requested target track in response to the requested target tracknot in the cache and point-in-time copy relationship informationindicating that the source track for the requested target track wascopied to the target storage; determining track format metadatacorresponding to the track format code from a track format code table inresponse to determining that the cache control block for the requestedtarget track includes a valid track format code; and using the trackformat metadata corresponding to the track format code to process therequest to the requested target track in the cache.
 13. The system ofclaim 8, wherein the request is received on a first channel connectingto a host, wherein the operations further comprise: failing the requestin response to point-in-time copy relationship information indicatingthat the source track for the requested target track needs to be copiedto the target storage.
 14. The system of claim 13, wherein theoperations further comprise: receiving the request to the requestedtarget track on a second channel connected to the host after failing therequest for the requested target track, wherein the staging the sourcetrack from the source storage and the including the track format code inthe cache control block are performed in response to receiving therequest on the second channel.
 15. A method for managing read and writerequests to a target storage, comprising: receiving a request to atarget track in the target storage in a point-in-time copy relationshipwith a source track in a source storage; staging the source track fromthe source storage to a cache to be used as the requested target track;including a track format code, identifying track format metadata for thestaged source track, in a cache control block for the staged sourcetrack; and using the track format code in the cache control block todetermine the track format metadata to process subsequent requests tothe requested target track in the cache.
 16. The method of claim 15,further comprising: maintaining a track format table associating trackformat codes with track format metadata, wherein each of the trackformat metadata indicates a layout of data in a track, wherein the trackformat table has track format metadata for the track format codeincluded in the cache control block that matches track format metadatafor the staged source track.
 17. The method of claim 16, furthercomprising: building track format metadata from the requested targettrack in the cache; and determining whether the track format tableincludes track format metadata matching the built track format metadata,wherein the track format code is included in the cache control block inresponse to determining that the track format table includes the builttrack format metadata.
 18. The method of claim 15, wherein the sourcetrack is staged from the source storage and included in the cachecontrol block in response to the point-in-time copy relationshipindicating the source track was not copied to the target storage,further comprising: staging the requested target track from the targetstorage to the cache in response to the requested target track not inthe cache and point-in-time copy relationship information indicatingthat the source track for the requested target track was copied to thetarget storage.
 19. The method of claim 15, wherein the source track isstaged from the source storage and included in the cache control blockin response to the point-in-time copy relationship indicating the sourcetrack was not copied to the target storage, further comprising:determining whether there is a valid track format code in the cachecontrol block for the requested target track in response to therequested target track not in the cache and point-in-time copyrelationship information indicating that the source track for therequested target track was copied to the target storage; determiningtrack format metadata corresponding to the track format code from atrack format code table in response to determining that the cachecontrol block for the requested target track includes a valid trackformat code; and using the track format metadata corresponding to thetrack format code to process the request to the requested target trackin the cache.
 20. The method of claim 15, wherein the request isreceived on a first channel connecting to a host, further comprising:failing the request in response to point-in-time copy relationshipinformation indicating that the source track for the requested targettrack needs to be copied to the target storage.
 21. The method of claim20, further comprising: receiving the request to the requested targettrack on a second channel connected to the host after failing therequest for the requested target track, wherein the staging the sourcetrack from the source storage and the including the track format code inthe cache control block are performed in response to receiving therequest on the second channel.